package com.shop.mapper;

import com.shop.entity.UserBehavior;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author XCH
 * @date 2025 - 06 - 24
 */
@Mapper
public interface UserBehaviorMapper {
    List<UserBehavior> getUserBehaviorByUserId(@Param("userId")Integer userId);
    List<UserBehavior> getProductIdAndActionType(@Param("productId")Integer ProductId, @Param("userId") Integer userId);
    void addUserBehavior(@Param("userId")int userId, @Param("productId")int productId, @Param("actionType")String actionType, @Param("createTime")String createTime);
    void deleteUserBehavior(@Param("id")Integer id);
    void updateUserBehaviorByCreateTime(@Param("createTime")LocalDateTime createTime, @Param("id")Integer id);
}
